package com.manda.smart.hub.expression.definition;

import com.googlecode.aviator.runtime.type.AviatorObject;
import com.googlecode.aviator.utils.Env;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author hongda.li
 */
@Data
@Accessors(chain = true)
public final class InvokeSession {

    private final Env env;

    private final AviatorObject[] objects;

    private final FunctionMeta functionMeta;

    private Object result;

    private Exception exception;

    private Invocation invocation;

    public InvokeSession(Env env, AviatorObject[] objects, FunctionMeta functionMeta) {
        this.env = env;
        this.objects = objects;
        this.functionMeta = functionMeta;
    }
}
